package com.hzit.order.service.impl;

import com.hzit.cart.api.RemoteCartService;
import com.hzit.cart.api.domain.Address;
import com.hzit.order.service.AddressService;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpRequest;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * 类名：
 * 作者：WF
 * 功能：
 */
@Service
public class AddressServiceImpl implements AddressService {

	@Autowired
	private RemoteCartService cartService;
	@Autowired
	HttpServletRequest request;
	//1. 得到登录用户的地址列表
	@Override
	public List<Address> getAddressList() {
		R<List<Address>> list = cartService.addressList();
		List<Address> data = list.getData();
		System.out.println("o = " + data);
		return data;
	}
}
